import { Axios } from 'assets/js/plugins/requester'

const urlPath = {
  address: '/mock/address.json',
  addressVant: '/mock/addressVant.json',
  userAddress: '/mock/userAddress.json',
  classifyGoodList: '/mock/classifyGoodList.json',
  userOrderList: '/mock/userOrderList.json',
  userScoreOrder: '/mock/userScoreOrder.json',
  userActiveOrder: '/mock/userActiveOrder.json',
  getExchangeInfo: '/mock/exchangeInfo.json',
  getLogisticInfo: '/mock/userLogistic.json',
  getInvitationRecord: '/mock/invitationRecord.json'
}

// mock数据参照这种写法
export const getAddress = () => {
  return Axios({
    method: 'get',
    url: urlPath.address
  })
}

export const getAddressVant = () => {
  return Axios({
    method: 'get',
    url: urlPath.addressVant
  })
}

export const getUserAddress = () => {
  return Axios({
    method: 'get',
    url: urlPath.userAddress
  })
}

export const getClassifyGoodList = () => {
  return Axios({
    method: 'get',
    url: urlPath.classifyGoodList
  })
}

export const userOrderList = () => {
  return Axios({
    method: 'get',
    url: urlPath.userOrderList
  })
}

export const userScoreOrder = () => {
  return Axios({
    method: 'get',
    url: urlPath.userScoreOrder
  })
}

export const userActiveOrder = () => {
  return Axios({
    method: 'get',
    url: urlPath.userActiveOrder
  })
}

export const getExchangeInfo = () => {
  return Axios({
    method: 'get',
    url: urlPath.getExchangeInfo
  })
}

export const getLogisticInfo = () => {
  return Axios({
    method: 'get',
    url: urlPath.getLogisticInfo
  })
}

export const inviteRecord = () => {
  return Axios({
    method: 'get',
    url: urlPath.getInvitationRecord
  })
}
